<template>
  <div class="circle" :class="{'checked': checked}" @click="_click"></div>
</template>

<script>
  export default {
    name: 'checkbox',
    props: {
      checked: Boolean
    },
    methods: {
      _click () {
        this.$emit('check')
      }
    }
  }
</script>

<style lang="less" scoped>
  .circle {
    display: inline-block;
    vertical-align: middle;
    width: 10px;
    height: 10px;
    box-sizing: border-box;
    background: #fff;
    border-radius: 100%;
    border: 1px solid #d9d9d9;
    &.checked {
      background-image: url("/static/image/cart/checked.png");
      background-position: 0 0;
      background-size: 100%;
      border: 0 none;
    }
  }
</style>
